<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<title>幸运大转盘</title>
		<%@include file="/WEB-INF/base.jspf"%>
		<link rel="stylesheet" href="/css/animate.min.css">
		<script src="/js/font_595888_1jlcfz62jg8vkj4i.js"></script>
		<style type="text/css">
			.wheel__main {
				width: 86vw;
			    height: 86vw;
			    text-align: center;
			    border: 3px solid #df1e00;
			    border-radius: 50%;
			    max-width: 470px;
			    max-height: 470px;
			    left: 50%;
			    top:54%;
			    -webkit-transform: translateX(-50%) translateY(-50%);
			    transform: translateX(-50%) translateY(-50%);
			    color: #fff;
			    box-shadow: 0 5px 5px rgba(0,0,0,.25);
			    font-weight: 700;
			    position: absolute;
			    background: #ffbe04;
			}
			* {
				-webkit-backface-visibility: hidden;
				-moz-backface-visibility: hidden;
				-ms-backface-visibility: hidden;
				backface-visibility: hidden;
			}
			.wheel__body {
				width: 88%;
			    height: 88%;
			    margin: 6% auto;
			    position: relative;
			    border: 2px solid #ff9000;
			    border-radius: 50%;
			}
			.wheel__inner, .wheel__part {
				    height: 100%;
   					position: absolute;
			}
			.wheel__part {
				width: 50%;
			    top: -50%;
			    left: 50%;
			    -webkit-transform-origin: left bottom;
			    transform-origin: left bottom;
			    background: #fff8c4;
			}
			.wheel__part:first-child {
				background:#41bbdf;
			}
			.wheel__part:nth-child(3) {
				background:#8a80f8;
			}
			.wheel__part:nth-child(5), .wheel__part:nth-child(13) {
				background:#f66aaa;
			}
			.wheel__part:nth-child(7), .wheel__part:nth-child(15), .wheel__part:nth-child(21) {
				background:#f05d38;
			}
			.wheel__inner {
				width: 100%;
			    background: #ffd277;
			    border-radius: 50%;
			    overflow: hidden;
			}
			.wheel__light, .wheel__prize {
				position: absolute;
				  height: 100%;
				  width: 100%;
				  top: 0;
				  left: 0;
				  -webkit-transform-origin: center;
				  transform-origin: center;
			}
			.wheel__prize-item {
				font-size:14px;
				padding: 10px 0 6px;
			}
			.wheel__prize-img {
				margin-top:2%;
				height: 9.5vw;
				max-height:60px;
				max-width:18%!important;
			}
			.wheel__lights {
				position: absolute;
				  top: 0;
				  width: 100%;
				  height: 100%;
				  overflow: hidden;
			}
			.wheel__light, .wheel__prize {
				position: absolute;
			    height: 100%;
			    width: 100%;
			    top: 0;
			    left: 0;
			    -webkit-transform-origin: center;
			    transform-origin: center;
			}
			.wheel__light:before {
			    content: "";
			    display: inline-block;
			    background: #fff;
			    box-shadow: 0 0 0 1px #f56403;
			    border-radius: 50%;
			    width: 3%;
			    padding-bottom: 3%;
			    margin-top: 1.8%;
			    position: relative;
			    bottom:2px;
			}
			
			.wheel__pointer {
			}
			.wheel__light.lightP:before {
				background:#df1e00;
			}
			.wheel__light.lightQ:before {
				box-shadow:0 0 5px 1px #fff3a9;
			}
			.wheel__prize:nth-child(2n) {
				color:#f77602;
			}
			/* .wheel__pointer-wrapper {
				top:0;
				left:0;
				right:0;
				bottom:0;
				position: absolute;
				display:flex;
				align-items:center;
				justify-content:center;
				z-index:10;
			} */
			.wheel__pointer {
				position: absolute;
				top:50%;
				left:50%;
				transform:translateX(-50%) translateY(-57.83%);
				z-index:2;
				width:30%;
				cursor: pointer;
				transform-origin:0% 0%;
			}
			.page-lucky__box {
				color: #fba069;
			    line-height: 1.75;
			    font-size: 15px;
			    font-weight: 700;
			   /*  border: 3px solid; */
			    border-radius: 12px;
			    width: 90%;
			    margin: 0 auto;
			   /*  padding: 12px; */
			    margin-top: 25px;
			    overflow: hidden; 
			}
			.lotter-list-wrapper {
				width:100%;
				max-width:960px;
				bottom:0;
				  position: absolute;
				 transform:translateY(80%);
				   background-color:rgb(239, 54, 49);
				   padding-bottom:30px;
			}
			.page-lucky__boxtitle {
			    display: inline-block;
			    background: rgb(239, 54, 49);
			    position: absolute;
			    top: -18px;
			    left: 10%;
			    margin-left:20px;
			    border-radius: 50%;
			    font-size:16px;
			}
			.page-lucky__boxtitle:after, .page-lucky__boxtitle:before {
			/* 	content: "";
			    display: inline-block;
			    width: 12px;
			    height: 12px;
			    background: currentColor; */
			   /*  border-radius: 50%; */
			}
			/* .page-lucky__boxtitle:after {
				margin-left:6px;
			}
			.page-lucky__boxtitle:before {
				margin-right:6px;
			} */
			.page-lucky__table {
				width:100%;
			}
			.page-lucky__table th, .page-lucky__table td {
				font-size:13px;
				padding:5px 0;
			}
			.page-lucky__table th, .page-lucky__table td:nth-child(1){
				width:36%;
			}
			
			.page-lucky__table th, .page-lucky__table td:nth-child(2){
				width:36%;	
			}
			
			.page-lucky__table th, .page-lucky__table td:nth-child(3){
				width:28%;
				/* float: right; */
			}
			.tool-bar {
				position: absolute;
				top:5%;
				display:flex;
				justify-content:space-between;
				z-index:2;
				width:100%;
				max-width:690px;
			}
			.tool-bar > a {
				color:white;
				border-radius: 18px;
				padding: 0.3rem;
				font-size:0.4rem;
				background:rgba(0,0,0,.5);
			}
			.p-c-noticeText {
				position: absolute;
				text-align: center;
				color:white;
				background-color:rgba(0,0,0,.5);
				padding:4px 10px;
				border-radius: 14px;
				z-index:3;
				left:50%;
				top:0;
				transform:translateX(-50%)translateY(-50%);
				white-space: nowrap;
			}
			.modal, .modal-open {
				overflow: auto!important;
			}
			body.modal-open {
				padding-right:0!important;
			}
			table.dataTable.no-footer {
				border-bottom:none;
			}
			#lotterListTable_paginate  * {
				font-size: 14px!important;
			}
			table.dataTable thead th {
				padding: 8px 10px;
			}
			.lotterResultWrapper {
				position: fixed;
				top:0;
				left:0;
				right:0;
				bottom:0;
				background-color:rgba(0, 0, 0, 0.8);
				z-index:50;
			    animation-duration: 0.3s;
			    display:none;
			    align-items:center;
			    justify-content:center;
			    max-width:690px;
			    margin:0 auto;
			}
			.lotterResultWrapper.zoomIn, .lotterResultWrapper.zoomIn {
				display:flex;
			}
			.lotterResultWrapper .lotterInner {
				width:80%;
			}
			.lotterResultWrapper .lotterInner .content {
				background-color:white;
				padding:10px;
			}
			.reslutPhoto {
				width:100%;
			}
			.lotterInner {
				
			}
			h3 {
				margin-top:0;
				margin-bottom:0;
			}
			.domin-text {
				position: absolute;
				left:50%;
				transform:translateX(-50%);
				z-index:2;
				top:0.28rem;
				margin:0;
				color:white;
				white-space: nowrap;
			}
			.lotter-inner {
				position: relative;
			}
			#resultName {
				position: absolute;
				left:52%;
			    font-family: Microsoft YaHei;
			    font-size: 0.6rem;
			    font-weight:bold;
			    color:#ff5b13;
			}
			.closeLotterResultModal {
				transform:translateY(-100%);
				cursor: pointer;
			}
		</style>
		<script type="text/javascript" src="/js/Tween.min.js"></script>
	</head>

	<body style="max-width:690px;margin: 0 auto;">
		<div id="loading" class="kd-loading">
	<div class="kd-spinner">
		<span class="bounce b1"></span>
		<span class="bounce b2"></span>
		<span class="bounce b3"></span>
	</div>
	<p>&nbsp;</p>
	<p>&nbsp;</p>
	<p>请稍等，努力加载中...</p>
</div>
<div class='wapper' style="display:none">
		<p class="domin-text"></p>
		 <div class="tool-bar">
			<a onclick="back()" style="border-top-left-radius:0;border-bottom-left-radius:0;">返回</a>
			<a class="checkMyLotterList" href="javascript:;" style="border-top-right-radius:0;border-bottom-right-radius:0;border-radius: 18px;">抽奖记录</a>
			<a class="luckyRule" href="#" style="border-top-right-radius:0;border-bottom-right-radius:0;">抽奖规则</a>
		</div>
		<div class="" style="padding: 0px;background:url(/img/zhuanpan-bg.png);background-size: 100% 100%;background-repeat:no-repeat;max-width:960px;position:relative;">
			<div class="wheel" style="min-height:100vh;position: relative;">
			<div class="wheel__main">
			<p class="p-c-noticeText">还剩<span style="color:#fee647;" class="span-c-Times"></span>次机会</p>
			<img src="/img/zhuanpan-zhen3.png" class="wheel__pointer">
 			<div class="wheel__body">
				<div class="wheel__inner" style="transform: rotate(0turn);background-image:url(/d/cp/lucky/lucky2.png);background-repeat:no-repeat;background-size:contain;">
<%-- 					<div class="wheel__part" style="transform: rotate(-0.0625turn) skewY(0.375turn);"></div>
					<div class="wheel__part" style="transform: rotate(0.0625turn) skewY(0.375turn);"></div>
					<div class="wheel__part" style="transform: rotate(0.1875turn) skewY(0.375turn);"></div>
					<div class="wheel__part" style="transform: rotate(0.3125turn) skewY(0.375turn);"></div>
					<div class="wheel__part" style="transform: rotate(0.4375turn) skewY(0.375turn);"></div>
					<div class="wheel__part" style="transform: rotate(0.5625turn) skewY(0.375turn);"></div>
					<div class="wheel__part" style="transform: rotate(0.6875turn) skewY(0.375turn);"></div>
					<div class="wheel__part" style="transform: rotate(0.8125turn) skewY(0.375turn);"></div>
					<div class="wheel__prize" style="transform: rotate(0turn);"><figure class="wheel__prize-item">
					<figcaption>祝您好运</figcaption> <img src="/img/2.png" class="wheel__prize-img" style="max-width: 20%;"></figure>
					</div>
					<div class="wheel__prize" style="transform: rotate(0.125turn);"><figure class="wheel__prize-item"><figcaption>幸运奖</figcaption> <img src="/img/1.png" class="wheel__prize-img" style="max-width: 20%;"></figure>
					</div>
					<div class="wheel__prize" style="transform: rotate(0.25turn);"><figure class="wheel__prize-item"><figcaption>六等奖</figcaption> <img src="//img1.1537799.com/savephoto/20180510174721.png" class="wheel__prize-img" style="max-width: 20%;"></figure>
					</div>
					<div class="wheel__prize" style="transform: rotate(0.375turn);"><figure class="wheel__prize-item"><figcaption>五等奖</figcaption> <img src="//img1.1537799.com/savephoto/20180510174926.png" class="wheel__prize-img" style="max-width: 20%;"></figure>
					</div>
					<div class="wheel__prize" style="transform: rotate(0.5turn);"><figure class="wheel__prize-item"><figcaption>四等奖</figcaption> <img src="//img1.1537799.com/savephoto/20180510174859.png" class="wheel__prize-img" style="max-width: 20%;"></figure>
					</div>
					<div class="wheel__prize" style="transform: rotate(0.625turn);"><figure class="wheel__prize-item"><figcaption>三等奖</figcaption> <img src="//img1.1537799.com/savephoto/20180510174844.png" class="wheel__prize-img" style="max-width: 20%;"></figure>
					</div><div class="wheel__prize" style="transform: rotate(0.75turn);"><figure class="wheel__prize-item"><figcaption>二等奖</figcaption> <img src="//img1.1537799.com/savephoto/20180510175123.png" class="wheel__prize-img" style="max-width: 20%;"></figure>
					</div>
					<div class="wheel__prize" style="transform: rotate(0.875turn);"><figure class="wheel__prize-item"><figcaption>特等奖</figcaption> <img src="//img1.1537799.com/savephoto/20180510174912.png" class="wheel__prize-img" style="max-width: 20%;"></figure>
					</div> --%>
				</div>
			</div>
			
			<div class="wheel__lights">
			<div class="wheel__light" style="transform: rotate(0.0294118turn);"></div><div class="wheel__light wheel__light--sm" style="transform: rotate(0.0588235turn);"></div><div class="wheel__light" style="transform: rotate(0.0882353turn);"></div><div class="wheel__light wheel__light--sm" style="transform: rotate(0.117647turn);"></div><div class="wheel__light" style="transform: rotate(0.147059turn);"></div><div class="wheel__light wheel__light--sm" style="transform: rotate(0.176471turn);"></div><div class="wheel__light" style="transform: rotate(0.205882turn);"></div><div class="wheel__light wheel__light--sm" style="transform: rotate(0.235294turn);"></div><div class="wheel__light" style="transform: rotate(0.264706turn);"></div><div class="wheel__light wheel__light--sm" style="transform: rotate(0.294118turn);"></div><div class="wheel__light" style="transform: rotate(0.323529turn);"></div><div class="wheel__light wheel__light--sm" style="transform: rotate(0.352941turn);"></div><div class="wheel__light" style="transform: rotate(0.382353turn);"></div><div class="wheel__light wheel__light--sm" style="transform: rotate(0.411765turn);"></div><div class="wheel__light" style="transform: rotate(0.441176turn);"></div><div class="wheel__light wheel__light--sm" style="transform: rotate(0.470588turn);"></div><div class="wheel__light" style="transform: rotate(0.5turn);"></div><div class="wheel__light wheel__light--sm" style="transform: rotate(0.529412turn);"></div><div class="wheel__light" style="transform: rotate(0.558824turn);"></div><div class="wheel__light wheel__light--sm" style="transform: rotate(0.588235turn);"></div><div class="wheel__light" style="transform: rotate(0.617647turn);"></div><div class="wheel__light wheel__light--sm" style="transform: rotate(0.647059turn);"></div><div class="wheel__light" style="transform: rotate(0.676471turn);"></div><div class="wheel__light wheel__light--sm" style="transform: rotate(0.705882turn);"></div><div class="wheel__light" style="transform: rotate(0.735294turn);"></div><div class="wheel__light wheel__light--sm" style="transform: rotate(0.764706turn);"></div><div class="wheel__light" style="transform: rotate(0.794118turn);"></div><div class="wheel__light wheel__light--sm" style="transform: rotate(0.823529turn);"></div><div class="wheel__light" style="transform: rotate(0.852941turn);"></div><div class="wheel__light wheel__light--sm" style="transform: rotate(0.882353turn);"></div><div class="wheel__light" style="transform: rotate(0.911765turn);"></div><div class="wheel__light wheel__light--sm" style="transform: rotate(0.941176turn);"></div><div class="wheel__light" style="transform: rotate(0.970588turn);"></div><div class="wheel__light wheel__light--sm" style="transform: rotate(1turn);"></div></div></div></div>
			<div class="lotter-list-wrapper">
				<div class="page-lucky__box">
					<span class="glyphicon glyphicon-tower" style="color: orange;position: absolute;top:-4px;"></span>
					<h6 class="page-lucky__boxtitle">抽奖列表</h6>
					<table class="page-lucky__table" style="white-space:nowrap;transform:translateX(100%);">
					<thead>
						<th>会员名称</th> 
						<th>奖品</th> 
						<th>参与时间</th>
					</thead> 
					<tbody></tbody></table>
				</div>
			</div>
			<div class="lotterResultWrapper animated">
				<div class="lotter-inner" style="width:80%;">
					<img class="lotter-result" style="width:100%;" />
					<span id="resultMoney" style="position:absolute;top:50%;left:50%;transform:translateX(-50%)translateY(-50%);color:rgb(255, 84, 24);font-family:Microsoft YaHei;font-size:1rem;"></span>
					<span id="resultName" style=""></span>
					
					
					<div class="closeLotterResultModal" style="position: absolute;top:0;right:0;padding:10px;">
					<!-- 	<div class="inner" style="width:1rem;height:1rem;display:flex;align-items:center;justify-content:center;border-radius: 50%;border:2px solid #bdbdbd;cursor: pointer;"> -->
							<span style="color:#bdbdbd;font-size:1.4rem;position: relative;">×</span>
<!-- 						</div> -->
					</div>
				</div>
				<!-- <span style="position: absolute;top:9.8rem;color:black;font-family:Microsoft YaHei;">特等奖</span> -->
<!-- 			<div class="div-c-svgWrapper-zoom" style="position:absolute;top:14%;right:10%;"><svg class="icon" aria-hidden="true" style="fill:#8e8e8e;width: 40px;height:40px;"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-14CIRCLE"></use></svg>
 -->				</div>
<!-- 					<div class="title" style="background-color:rgb(255, 84, 24);border-top-color:rgb(255, 84, 24);border-bottom-color:rgb(255, 84, 24);justify-content:center;position: relative;">
						<span style="font-size:24px;font-weight:bold;letter-spacing: 4px;">抽奖结果</span>
					</div>
					<div class="content">
						<h3 class="giftType" style="text-align: center;margin-bottom:6px;"></h3>
						<p style="text-align: center;font-size:30px;" class="resultMoney"></p>
					</div> -->
			</div>
		<div class="modal-div-fakeModal" id="div-i-noticeGenDan">
			<div class="div-c-modalContent">
				<h3 class="fakemodal-title"></h3>
				<div class="fakemodal-content"></div>
				<div class="fakemodal-btnsGroup"><button class="btn btn-default btn-class-closeFakeModal">关闭</button></div>
			</div>
		</div>		
		
		
		<!-- 模态框（Modal） -->
<div class="modal fade" id="lotterListModal" tabindex="-1" role="dialog" aria-labelledby="lotterListModal" aria-hidden="true">
    <div class="modal-dialog" style="width:90vw;max-width:500px;margin: 0 auto;">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel" style="text-align: center;letter-spacing: 3px;">我的抽奖记录</h4>
            </div>
            <div class="modal-body" style="height:65vh;overflow:auto;">
 				<table  class="table table-striped" id="lotterListTable">
 					<thead>
 						<th>抽奖时间</th>
 						<th>奖品名称</th>
 						<th>中奖金额</th>
 					</thead>
 					<tbody>
 					</tbody>
 				</table>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">关　闭</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div>
</div>
<!-- /.modal -->

	
	</body>
	<script type="text/javascript">
	$(function(){
		$('.luckyRule').on('click',findLuckyRul);
		
	});
	function findLuckyRul(){
		$.post('/explains/findByIdExplain.do',{id:1},function(result){
			var data = result.data;
			showAlertNotice("抽奖说明", result.data.lucky_explain, "")
		});
	}
		document.onreadystatechange = function(){ 
		　　 if(document.readyState == "complete"){ 　　//当页面加载状态为完全结束时进入 
		    　 //你要做的操作。
			 $(".wapper").show() 
			 $(".kd-loading").hide()
		   　 }
		}
	
	var fontSize = document.documentElement.clientWidth / 10
	if (fontSize > 69) {
		fontSize = 69
	}
	$("html").css("font-size", fontSize + "px")
		ajax({
			url:"/title.do",
			type: "post",
			data: {},
			success: function(data) {
				var newData = JSON.parse(data)
				$(".domin-text").text(newData.data.luckyTitle)
			},
			error: function(status) {
			}
		})	
	
		$(".closeLotterResultModal").on(getEndClickEvent(), function(e) {
			$(".lotterResultWrapper").addClass("zoomOut").one(getAnimationEventName($(".lotterResultWrapper")[0]), function(e) {
				$(".lotterResultWrapper").removeClass("zoomIn").removeClass("zoomOut")
			})
		})
			$("#lotterListTable").DataTable({
	      // "bPaginate": true,
	      "bLengthChange": true,      
	      "bSort": false,
	      // "bInfo": true,
	      "bAutoWidth": false,
	      //"dom": `ft<"tableToolBar" p<"lengthWrapper" l>i>`,
	      "dom": 't<"toolbar" pi>',
//	         "bServerSide":true,
	      'aLengthMenu':[10],
	       "searching": true,  
	      "stateSave": true,
	      "stateDuration": 365,
 	         "columns": [
	                     { "data": "createTime" },
	                     { "data": "type", "className": "type-td" },
	                     { "data": "money", "className": "money-td" },
	                 ],	
	      "ajax": {
    	  	  "type": 'POST',
    	      "url":"/u/luckyRecord.do", 
	      },
	       "language": {//语言设置  
	            "zeroRecords": "暂无抽奖记录",     
	            "sInfo": "第 _PAGE_ / _PAGES_ 页",     
	            "info": "没有数据",     
	            "oPaginate": {     
	                "sFirst": "首页",     
	                "sPrevious": "上一页",     
	                "sNext": "下一页",     
	                "sLast": "尾页"    
	          	},
	            "search":"",
	            "searchPlaceholder": "请输入关键字",
	            "infoFiltered":   "",
	            "infoEmpty":      "",
	         }
	    })
	   
    	$(".checkMyLotterList").on("click", function(event) {
    		$("#lotterListTable").DataTable().ajax.url("/u/luckyRecord.do").load();
    		$("#lotterListModal").modal("show")
		})
	    function autoUpdateLotterList() {
			ajax({
				url: "/u/mathRecord.do",
				type: "post",
				data: {},
				success: function(data) {
					var newData = JSON.parse(data)
					$(".page-lucky__table tbody").empty()
					for (var i = 0; i < newData.data.length; i++) {
						var item = newData.data[i]
						var $tr = $("<tr><td>" + item.name.slice(0, item.name.length - 2) + "**" + "</td><td>" + item.type + "</td><td>" + item.createTime.split(" ")[0] + "</td></tr>")
						$(".page-lucky__table tbody").append($tr)
						
					}
				},
				error: function(status) {
				}
			})	
			setInterval(function() {
				ajax({
					url: "/u/mathRecord.do",
					type: "post",
					data: {},
					success: function(data) {
						var newData = JSON.parse(data)
						$(".page-lucky__table tbody").empty()
						for (var i = 0; i < newData.data.length; i++) {
							var item = newData.data[i]
							var $tr = $("<tr><td>" + item.name.slice(0, item.name.length - 2) + "**" + "</td><td>" + item.type + "</td><td>" + item.createTime.split(" ")[0] + "</td></tr>")
							$(".page-lucky__table tbody").append($tr)
						}
					},
					error: function(status) {
					}
				})				
			}, 5000)
		}
		
		autoUpdateLotterList()
	    
		function getUserLotterTimes() {
			if ("${user.state}" === "2") {
				$(".span-c-Times").text("0")
				return
			}
			ajax({
				url: "/u/luckyCount.do",
				type: "post",
				data: {},
				success: function(data) {
					if (data.indexOf("<!DOCTYPE html>") != -1) {
						window.location.reload()
					}				
					var newData = JSON.parse(data)
					$(".span-c-Times").text(newData.data)
				},
				error: function(status) {
					showNormalNoticeModal("#div-i-noticeGenDan", "提示：", "网络异常")
				}
			})
		}
		getUserLotterTimes()
	
		function animate(time) {
		    requestAnimationFrame(animate);
		    TWEEN.update(time);
		}
		
		var u = navigator.userAgent
	    //var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
	    //var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
	    //var cssStyle = isiOS ? "translate3d(0,0,0)" : ""
	    		
	    var zhuanpanLock = true		
		var highLightEventId		
		function autoHighLight() {
			highLightEventId = setInterval(function () {
				$(".wheel__light:nth-child(even)").toggleClass("lightP")
				$(".wheel__light:nth-child(odd)").toggleClass("lightQ")
			},1000)
		}
		autoHighLight()
	    
		$(".wheel__pointer").on(getEndClickEvent(), function(e) {
			if ("${user.state}" === "2") {
				showNormalNoticeModal("#div-i-noticeGenDan", "提示：", "试玩账号无法抽奖，请注册为正式会员")
				return
			}			
			if (!zhuanpanLock) {
				return
			}
			zhuanpanLock = false
			clearInterval(highLightEventId)
			ajax({
				url: "/u/luckyReckon.do",
				type: "post",
				data: {},
				success: function(data) {
					
					if (data.indexOf("<!DOCTYPE html>") != -1) {
						window.location.reload()
					}				
					var newData = JSON.parse(data)
					if (newData.data === 10) {
						showNormalNoticeModal("#div-i-noticeGenDan", "提示：", newData.message)
						zhuanpanLock = true
						return
					}
					var dataArr = newData.data.split(",")
					var times = dataArr[1]
					var result = dataArr[0]
					var moneyValue = dataArr[2] 
					roleZhuanPan(Number(times), result, moneyValue)
					var currentTimes = Number($(".span-c-Times").text())
					currentTimes -= 1
					$(".span-c-Times").text(currentTimes)
				},
				error: function(status) {
					showNormalNoticeModal("#div-i-noticeGenDan", "提示：", "网络异常")
					zhuanpanLock = true
				}
			})			
		})	
			var zhuanObj = {
				"特等奖": 315,
				"二等奖": 270,
				"三等奖": 225,
				"四等奖": 180,
				"五等奖": 135,
				"六等奖": 90,
				"幸运奖": 45,
				"祝你好运": 360,
			}
			
			
			function roleZhuanPan(times, result, money) {
				var fakeTims = times
				var zhongdian = fakeTims * 360 + zhuanObj[result]
				requestAnimationFrame(animate);
				var coords = { x: 0}
				var tween = new TWEEN.Tween(coords)
		        .to({ x: zhongdian}, fakeTims * 1000)
		        .easing(TWEEN.Easing.Quartic.Out)
		        .onUpdate(function() {
		        	// transform-origin:0% 9.22%;
		          	//$(".wheel__inner").css('transform', "rotate(" + coords.x + "deg)")
		          	$(".wheel__pointer").css('transform', "rotate(" + coords.x + "deg) translateX(-50%) translateY(-57.83%)")
		          	//$(".wheel__pointer-wrapper").css('transform', "rotate(" + coords.x + "deg)" + cssStyle)
		        })
		        .onComplete(function() {
		        	$(".lotterResultWrapper").addClass("zoomIn")
		        	if (result === "祝你好运") {
		        		$(".lotter-result").prop("src", '/img/weizhongjiang.png')
		        		$("#resultMoney").text("")
		        		$("#resultName").text("")
		        	} else {
		        		$(".lotter-result").prop("src", '/img/zhongjia.png')
		        		$("#resultMoney").text("￥" + money)
		        		$("#resultName").css("top", ($(".lotter-result").width() * 0.235) + "px")
		        		$("#resultName").text(result)
		        		$("#resultName").css("transform", "translateY(" + (($(".lotter-result").width() * 0.119) - $("#resultName").height()) + "px)")
		        	}
/* 		        	$(".giftType").text(result)
		        	$(".resultMoney").text(money + "元") */
		        	$(".wheel__pointer").css('transform', "rotate(0deg) translateX(-50%) translateY(-57.83%)")
		        	zhuanpanLock = true
		        	autoHighLight()
		        })		        
		        .start();			
			}
		
		/*  var allWidth = document.querySelector("page-lucky__table")
		var i = allWidth */
		 var allWidth=$(".lotter-list-wrapper")[0].clientHeight+10
		var i=allWidth
		 window.setInterval(function() {
			$(".page-lucky__table").css({
				"transform": "translateY(" + i + "px)"
			})
			i=i-2
			if (Math.abs(i) == allWidth) {
				i = allWidth
			}
		}, 200) 
		
	</script>
</html>